package com.zhao.consumer;

import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.alibaba.fastjson.JSON;
import com.zhao.model.GetSetData;
import com.zhao.model.Lnglat;
import com.zhao.service.DubboService;

public class Customer {
	public static void main(String[] args) throws Exception {
		ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
				new String[] { "applicationContext.xml" });
		context.start();
		DubboService dubboService = (DubboService) context.getBean("dubboService");
		System.out.println(dubboService);
		 Lnglat lnglat = new Lnglat();
		 lnglat.setLatitude(31.777);
		 lnglat.setLongitude(121.888);
	    GetSetData name = dubboService.getData(lnglat);
		System.out.println(JSON.toJSONString(name));
		System.in.read();
	}
}
